import request from '@/utils/request/request';
// import { FileRecordReq } from './model/fileModel';
import { FileRecordReq } from '@/api/model/fileModel';

// 报价信息维护分页查询
export function selectQuoteByPage(data: any) {
  return request.post('/api/procurement/require/quote/selectQuoteByPage', data);
}

// 报价单批量退回
export function batchUpdateRegression(data: any) {
  return request.post(
    '/api/procurement/require/quote/batchUpdateRegression',
    data
  );
}

// 导入报价信息
export function importQuoteExcel(data: FormData, params: FileRecordReq) {
  return request.post('/api/procurement/require/quote/importQuoteExcel', data, {
    params,
    headers: {
      'Content-Type': 'application/form-data',
    },
  });
}

// 导入报价信息校验
export function importQuoteExcelCheck(data: any) {
  return request.post(
    '/api/procurement/require/quote/importQuoteExcelCheck',
    data
  );
}

// 报价单明细分页查询
export function selectQuoteItemByPage(data: any) {
  return request.post(
    '/api/procurement/require/quote-item/selectQuoteItemByPage',
    data
  );
}

// 修改报价单明细
export function updateQuoteItem(data: any) {
  return request.post(
    '/api/procurement/require/quote-item/updateQuoteItem',
    data
  );
}

// 批量修改报价状态（报价,不报价）
export function batchUpdateQuoteStatus(data: any) {
  return request.post(
    '/api/procurement/require/quote-item/batchUpdateQuoteStatus',
    data
  );
}

// 批量报价完成
export function batchQuoteFinish(data: any) {
  return request.post(
    '/api/procurement/require/quote-item/batchQuoteFinish',
    data
  );
}
